﻿<phone:PhoneApplicationPage
    x:Class="eventful.EventDetail"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    toolkit:TiltEffect.IsTiltEnabled="True"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardIn"/>
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardOut"/>
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardOut"/>
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>


    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" >
        <Grid.Background>
            <ImageBrush ImageSource="{Binding Image}" Opacity=".4"/>
        </Grid.Background>
        <StackPanel Name="pbar" VerticalAlignment="Center" >
            <ProgressBar Width="480" Visibility="Visible" IsIndeterminate="True" />
            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">Loading...</TextBlock>
        </StackPanel>
        <!--Pivot Control-->
        <phone:Pivot Title="{Binding Title}">
            <!--Pivot item one-->
            <phone:PivotItem Header="about" Visibility="Collapsed" x:Name="firstItem">
                    
                    <StackPanel>
                        <!-- Image Source="{Binding Image}" HorizontalAlignment="Left" Height="456" Margin="0,0,0,0" VerticalAlignment="Top" Width="456"/ -->
                        <TextBlock TextWrapping="Wrap" Text="{Binding Title}" Style="{StaticResource PhoneTextNormalStyle}"/>
                        <TextBlock TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}">price</TextBlock>
                        <TextBlock TextWrapping="Wrap" Text="{Binding Price}" Style="{StaticResource PhoneTextNormalStyle}"/>
                        <TextBlock TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}">when</TextBlock>
                        <TextBlock TextWrapping="Wrap" Text="{Binding Date}" Style="{StaticResource PhoneTextNormalStyle}"/>
                        <TextBlock TextWrapping="Wrap" Text="{Binding Time}" Style="{StaticResource PhoneTextNormalStyle}"/>

                        <TextBlock TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}">where</TextBlock>
                        <StackPanel Tap="StackPanel_Tap">
                            <TextBlock TextWrapping="Wrap" Text="{Binding Address}" Style="{StaticResource PhoneTextAccentStyle}"/>
                        <StackPanel Orientation="Horizontal" >
                            <TextBlock TextWrapping="Wrap" Text="{Binding City}" Style="{StaticResource PhoneTextAccentStyle}"/>
                            <TextBlock Text=", " Style="{StaticResource PhoneTextAccentStyle}" Margin="0,0,0,0"/>
                            <TextBlock TextWrapping="Wrap" Text="{Binding Region}" Style="{StaticResource PhoneTextAccentStyle}"/>
                        </StackPanel>
                        </StackPanel>
                        <Button Click="Button_Click">More info...</Button>

                    </StackPanel>
            </phone:PivotItem>

            <!--Pivot item two-->
            <phone:PivotItem Header="links">
                <ListBox ItemsSource="{Binding Links}" SelectionChanged="ListBox_SelectionChanged">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel>
                                <TextBlock TextWrapping="Wrap" Text="{Binding LineTwo}" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
                                <TextBlock TextWrapping="NoWrap" Text="{Binding LineOne}" Style="{StaticResource PhoneTextAccentStyle}"/>
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>

            </phone:PivotItem>
        </phone:Pivot>
    </Grid>

</phone:PhoneApplicationPage>